﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudApiServer
{
    public class FsiBinZhouHeader
    {
        public string appid { get; set; }
        public string bizContent { get; set; }
        public string method { get; set; }

        public string sign { get; set; }
        public string timestamp { get; set; }
    }

    public class FsiBinZhouRequest
    {
        public int code { get; set; }
        public string msg { get; set; }
        public string bizContent { get; set; }
    }

    /// <summary>
    /// fsi传入头部
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiBinzhouRequestHeader<TResult>
    {
        public string recer_sys_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dev_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dev_safe_info { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string signtype { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string cainfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string infver { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrtarea_admvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insuplc_admdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedins_code { get; set; }
        /// <summary>
        /// 宁波市洪福昌药品销售有限公司
        /// </summary>
        public string fixmedins_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sign_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public TResult Input { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string msgid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string inf_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string info { get; set; }
    }

    public class BinzhouInputSignIn
    {
        public BinzhouDataSignIn data { get; set; }
    }
    /// <summary>
    /// 9001签到传入Data
    /// </summary>
    public class BinzhouDataSignIn
    {
        public string ip { get; set; }
        public string mac { get; set; }
        public string opter_no { get; set; }
    }
    /// <summary>
    /// 9002签退传入input
    /// </summary>
    public class BinzhouInputSignOut
    {
        public BinzhouDataSignOut data { get; set; }
    }
    /// <summary>
    /// 9002签退传入Data
    /// </summary>
    public class BinzhouDataSignOut
    {
        public string sign_no { get; set; }
        public string opter_no { get; set; }
    }

    public class outputBinzhousignInOut
    {
        public BinzhousignInOut result { get; set; }
    }
    public class BinzhousignInOut
    {
        public string sign_no { get; set; }
        public string sign_time { get; set; }
    }

    public class BinzhouOrder
    {
        /// <summary>
        /// 
        /// </summary>
        public string tradeNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double price { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string pharCertNo { get; set; }
        /// <summary>
        /// 白术
        /// </summary>
        public string pharName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<BinzhouOrderdetailList> details { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string isDisease { get; set; }
    }
    public class BinzhouOrderdetailList
    {
        /// <summary>
        /// 
        /// </summary>
        public int typeCatalogue { get; set; }
        /// <summary>
        /// 马应龙麝香痔疮膏
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int price { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int amount { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string barCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hilistCode { get; set; }
        /// <summary>
        /// 马应龙麝香痔疮膏
        /// </summary>
        public string hilistName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsHilistId { get; set; }
        /// <summary>
        /// 马应龙麝香痔疮膏
        /// </summary>
        public string fixmedinsHilistName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugstdCode { get; set; }
        /// <summary>
        /// 西药
        /// </summary>
        public string typeOP { get; set; }
        /// <summary>
        /// 盒
        /// </summary>
        public string prcunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string outRecipe { get; set; }
        /// <summary>
        /// 4g*8支
        /// </summary>
        public string spec { get; set; }
        /// <summary>
        /// 软膏剂
        /// </summary>
        public string dosform { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int amt { get; set; }
        /// <summary>
        /// 马应龙药业集团股份有限公司
        /// </summary>
        public string prdr { get; set; }
        /// <summary>
        /// 国药准字Z42021920
        /// </summary>
        public string aprvNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string productUuid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hilistType { get; set; }
    }
    public class BinzhouOrderQuery 
    {
        public string tradeNo { get; set; }
    }

    public class outputBinzhouOrderQuery 
    {
        public int flag { get; set; }
        public string tradeNo { get; set; }

        public int tradeType { get; set; }
        public int tradeStatus { get; set; }
        public string tradeTime { get; set; }
        public string name { get; set; }
        public string socialCardNo { get; set; }
        public string idCardNo { get; set; }
        public string insuredCode { get; set; }
        public string settleId { get; set; }
        public string mdtrtId { get; set; }
        public string hiRxno { get; set; }

        public string rxChkBizSn { get; set; }
        public string hiFeesetlFlag { get; set; }
        public string psnCashPay { get; set; }
        public string mdtrtareaNo { get; set; }
    }
    //退费传出 
    public class BinzhouOrderReturn
    {
        /// <summary>
        /// 
        /// </summary>
        public string refundNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tradeNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int refundType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int price { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<BinzhouOrderReturndetailList> details { get; set; }
    }
    //退费传出data
    public class BinzhouOrderReturndetailList
    {
        /// <summary>
        /// 
        /// </summary>
        public string barCode { get; set; }
        /// <summary>
        /// 头孢氨苄胶囊
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int amount { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int price { get; set; }
    }
    //商品变更传入
    public class Binzhoucatalogue
    {
        [Key]
        [Column("p_yyxmbm")]
        public string p_yyxmbm { get; set; } // 药店项目编码  

        [Column("p_yyxmmc")]
        public string p_yyxmmc { get; set; } // 药店项目名称  

        [Column("p_ypbz")]
        public string p_ypbz { get; set; } // 药品标志  

        [Column("p_dj")]
        public decimal p_dj { get; set; } // 最小包装规格的单价  

        [Column("p_zxgg")]
        public string p_zxgg { get; set; } // 最小规格  

        [Column("p_bhsl")]
        public decimal p_bhsl { get; set; } // 大包装包含小规格的数量  

        [Column("p_zdgg")]
        public string p_zdgg { get; set; } // 大包装规格  

        [Column("p_mzjsxmbh")]
        public string p_mzjsxmbh { get; set; } // 门诊结算项目编号  

        [Column("p_zyjsxmbh")]
        public string p_zyjsxmbh { get; set; } // 住院结算项目编号  

        [Column("p_jj")]
        public string p_jj { get; set; } // 禁忌  

        [Column("p_scqy")]
        public string p_scqy { get; set; } // 生产企业  

        [Column("p_spm")]
        public string p_spm { get; set; } // 商品名  

        [Column("p_dw")]
        public string p_dw { get; set; } // 单位  

        [Column("p_gmpbz")]
        public string p_gmpbz { get; set; } // 是否GMP  

        [Column("p_cfybz")]
        public string p_cfybz { get; set; } // 是否处方药  

        [Column("p_jxm")]
        public string p_jxm { get; set; } // 剂型  

        [Column("p_ylxmbm")]
        public string p_ylxmbm { get; set; } // 对应的医保项目编码  

        [Column("p_bcxm")]
        public string p_bcxm { get; set; } // 补充信息  

        [Column("p_syz")]
        public string p_syz { get; set; } // 适应症  

        [Column("p_pjcpmc")]
        public string p_pjcpmc { get; set; } // 批件产品名称  

        [Column("p_zczh")]
        public string p_zczh { get; set; } // 注册证号  

        [Column("p_zcjzrq")]
        public string p_zcjzrq { get; set; } // 注册截止日期  

        [Column("p_cdm")]
        public string p_cdm { get; set; } // 产地  

        [Column("p_model")]
        public string p_model { get; set; } // 型号  

        [Column("p_cljj")]
        public decimal? p_cljj { get; set; } // 进价  

    }
    //商品变更传出
    public class outputBinzhoucatalogue
    {
        public int   resultcode { get; set; }

        public string resulttext { get; set; }
    }

    /// <summary>
    /// 滨州 查询处方接口传入
    /// </summary>
    public class BinzhouQueryEpc
    {
        public int status { get; set;}
        public string prscTime_ge { get; set; }
        public string prscTime_le { get; set; }
        public string patnName { get; set; }
        public int pageNo { get; set; }
        public int pageSize { get; set; }
    }
    /// <summary>
    /// 滨州 查询处方传出 output
    /// </summary>
    public class outputBinzhouQueryEpc 
    {
        public int flag { get; set; }
        public int total { get; set; }
        public List<outputBinzhouEpcList> epcList { get; set; }
    }
    public class outputBinzhouEpcList
    {
        public string id {  get; set; }
        public string hiRxno { get; set; }
        public string rxTraceCode { get; set; }
        public string fixmedinsCode { get; set; }

        public string fixmedinsName { get; set; }
        public string prscTime { get; set; }
        public string prscDeptName { get; set; }
        public string valiEndTime { get; set; }
        public string rxTypeCode { get; set; }
        public string rxTypeName { get; set; }
        public string longRxFlag { get; set; }
        public string rxFileId { get; set; }
        public string fileSuffix { get; set; }

        public string medType { get; set; }
        public string otpIptFlag { get; set; }
        public string patnName { get; set; }
        public double? patnAge { get; set; }
        public double? patnHgt { get; set; }
        public double? patnWt { get; set; }
        public string gend { get; set; }

        public double? gesoVal { get; set; }
        public string nwbFlag { get; set; }
        public string nwbAge { get; set; }
        public string suckPrdFlag { get; set; }
        public string algsHis { get; set; }
        public string maindiagCode { get; set; }
        public string maindiagName { get; set; }
        public string diseCondDscr { get; set; }
        public string diseCodg { get; set; }
        public string diseName { get; set; }
        public List<outputBinzhouEpcdrugList> drugList { get; set; }
    }

    public class outputBinzhouEpcdrugList
    {
        public string medListCodg { get; set; }
        public string fixmedinsHilistId { get; set; }
        public string hospPrepFlag { get; set; }
        public string rxItemTypeCode { get; set; }
        public string rxItemTypeName { get; set; }
        public string tcmdrugTypeName { get; set; }
        public string tcmdrugTypeCode { get; set; }
        public string tcmherbFoote { get; set; }
        public string mednTypeCode { get; set; }

        public string mednTypeName { get; set; }
        public string mainMedcFlag { get; set; }
        public string urgtFlag { get; set; }
        public string basMednFlag { get; set; }
        public string impDrugFlag { get; set; }
        public string drugProdname { get; set; }
        public string drugGenname { get; set; }
        public string drugDosform { get; set; }
        public string drugSpec { get; set; }

        public string prdrName { get; set; }
        public string medcWayCodg { get; set; }
        public string medcWayDscr { get; set; }
        public string medcBegntime { get; set; }
        public string medcEndtime { get; set; }
        public double? medcDays { get; set; }
        public double? drugCnt { get; set; }
        public string drugDosunt { get; set; }
        public double? sinDoscnt { get; set; }
        public string sinDosunt { get; set; }
        public string usedFrquCodg { get; set; }
        public string usedFrquName { get; set; }
        public double? drugTotlcnt { get; set; }
        public string drugTotlcntEmp { get; set; }
        public string hospApprFlag { get; set; }

    }
}
